//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatGraphic, WechatGraphicResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatGraphicList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatGraphicResponse>(`/uctoo/wechat_graphic/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatGraphic = async (id: string) => {
  return requestClient.get<WechatGraphic>(`/uctoo/wechat_graphic/${id}`);
};

export const adductooWechatGraphic = async (data: Partial<WechatGraphic>) => {
  return requestClient.post<WechatGraphic>('/uctoo/wechat_graphic/add', data);
};

export const edituctooWechatGraphic = async (data: Partial<WechatGraphic>) => {
  return requestClient.post<WechatGraphic>('/uctoo/wechat_graphic/edit', data);
};

export const deleteuctooWechatGraphic = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechat_graphic/del', { id });
};
